<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
	<link rel="stylesheet" type="text/css" href="css/from.css">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
	<script type="text/javascript" src="js/jquery-2.2.0.min.js"></script>
    <script type="text/jscript" src="js/from.js"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=qnc6n20Ap59MeYXQcomDaj8DQEKjT537"></script>
	<title>计算驾车时间与距离</title>
</head>
<body>
    <div class="header">
        <ul>
            <li><a href="grwl_cw.html" class="header-add">临沂</a><span>【切换城市】</span></li>
            <li><a href="index.html">首页</a></li>
            <li><a href="licheng.html">里程查询</a></li>
            <li><a href="entry.html">登录</a></li>
            <li><a href="enroll.html">注册</a></li>
        </ul>
    </div>
    <div class="banner">
    	<div class="dl-logo">
    		<img src="images/logo.png" class="img-responsive" alt="Cinque Terre">
    	</div>
    	<h3>路线查询</h3>
    	<div class="banner-inp">
    		<input type="button" value="始发：临沂" class="inp-sf">
    	    <input type="text" placeholder="请输入目的地" class="inp-add"></input>
    	    <button>搜索</button>
    	</div>
    	<p>总里程约<span class="spana">0公里</span>数据仅供参考，详情请咨询此专线星级会员</p>
    </div>
    <div class="nr">
    	<div class="nr-left">
    		<div class="nr-left-top">
    			<h4>往返<span class="spana">北京</span>的物流公司有</h4>
    		    <p>为了您的货物安全，建议您选择已认证会员！</p>
    		</div>
    		<div class="nr-left-bottom">
    			<div class="nr-left-bottom-nr">
    				<a href="company.html" class="nra1">临沂某一个物流有限公司</a><a href="#" class="nra2">查看详情 》</a>
    				<ul>
    					<li>直达城市：</li>
    					<li>
    						<a href="#">临沂<i class="fa fa-exchange"></i>北京</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    					</li>
    				</ul>
    				<ul>
    					<li>推荐指数：</li>
    					<li><img src="images/zs.png"></li>
    				</ul>
    				<ul>
    					<li>工商认证：</li>
    					<li><span class="spana">已认证</span></li>
    				</ul>
    				<ul>
    					<li>注册时间：</li>
    					<li><span class="spana">2010-02-12</span></li>
    				</ul>
    			</div>
    			<div class="nr-left-bottom-nr">
    				<a href="company.html" class="nra1">临沂某一个物流有限公司</a><a href="#" class="nra2">查看详情 》</a>
    				<ul>
    					<li>直达城市：</li>
    					<li>
    						<a href="#">临沂<i class="fa fa-exchange"></i>北京</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    					</li>
    				</ul>
    				<ul>
    					<li>推荐指数：</li>
    					<li><img src="images/zs.png"></li>
    				</ul>
    				<ul>
    					<li>工商认证：</li>
    					<li><span class="spana">已认证</span></li>
    				</ul>
    				<ul>
    					<li>注册时间：</li>
    					<li><span class="spana">2010-02-12</span></li>
    				</ul>
    			</div>
    			<div class="nr-left-bottom-nr">
    				<a href="company.html" class="nra1">临沂某一个物流有限公司</a><a href="#" class="nra2">查看详情 》</a>
    				<ul>
    					<li>直达城市：</li>
    					<li>
    						<a href="#">临沂<i class="fa fa-exchange"></i>北京</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    					</li>
    				</ul>
    				<ul>
    					<li>推荐指数：</li>
    					<li><img src="images/hg.png"></li>
    				</ul>
    				<ul>
    					<li>工商认证：</li>
    					<li><span class="spana">已认证</span></li>
    				</ul>
    				<ul>
    					<li>注册时间：</li>
    					<li><span class="spana">2010-02-12</span></li>
    				</ul>
    			</div>
    			<div class="nr-left-bottom-nr">
    				<a href="#" class="nra1">临沂某一个物流有限公司</a><a href="#" class="nra2">查看详情 》</a>
    				<ul>
    					<li>直达城市：</li>
    					<li>
    						<a href="#">临沂<i class="fa fa-exchange"></i>北京</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    						<a href="#">张家口</a><a href="#">张家口</a>
    						<a href="#">锡林浩特</a><a href="#">邢台</a>
    						<a href="#">上海</a><a href="#">北海</a>
    					</li>
    				</ul>
    				<ul>
    					<li>推荐指数：</li>
    					<li><img src="images/hg.png"></li>
    				</ul>
    				<ul>
    					<li>工商认证：</li>
    					<li><span class="spana">已认证</span></li>
    				</ul>
    				<ul>
    					<li>注册时间：</li>
    					<li><span class="spana">2010-02-12</span></li>
    				</ul>
    			</div>
    		</div>
    	</div>
		<div class="dituaa">
			<div id="allmap"></div>
		</div>
    </div>
</body>
</html>
<script type="text/javascript">
		// 百度地图API功能
		var map = new BMap.Map("allmap");
		map.centerAndZoom(new BMap.Point(116.404, 39.915), 12);
	$(function(){
		$(".banner-inp button").click(function(){
			var output = "  ";
			var bb=$(".inp-add").val();
			$(".nr-left span").html(bb)
		    var searchComplete = function (results){
			if (transit.getStatus() != BMAP_STATUS_SUCCESS){
				return ;
			}
			var plan = results.getPlan(0);
			output += plan.getDistance(true) + "\n";             //获取距离
			}
			var transit = new BMap.DrivingRoute(map, {renderOptions: {map: map},
				onSearchComplete: searchComplete,
				onPolylinesSet: function(){        
					setTimeout(function(){
						var aa=$(".banner span").html(output)
					});
			}});
			transit.search("临沂",bb);
		})
	})
	
</script>
